<?php

require_once "core/application/models/mreg/mreg1.php";

class Mreg2 extends Mreg1 {

    private $_query;

    protected function issetName($login) {
        /**
         *   уже есть такой аккаунт ?
         * @param string $login
         */
        DB::getInstance()->openConnectionToLS();
        $this->_query = "SELECT `name` FROM `account_data` WHERE `name` = '$login' ";
        if (mysql_num_rows(DB::getInstance()->sql($this->_query))) {
            return true;
            DB::getInstance()->closeConnection();
            unset($this->_query);
        } else {
            return false;
            DB::getInstance()->closeConnection();
            unset($this->_query);
        }
    }

}

?>
